package com.gitee.zou8944.ipersist.core.bean

enum class SqlType {
    SELECT, INSERT, UPDATE, DELETE;

    companion object {
        fun from(literal: String): SqlType = when (literal) {
            "select" -> SELECT
            "insert" -> INSERT
            "update" -> UPDATE
            "delete" -> DELETE
            else -> throw Exception()
        }
    }
}